home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er Special 34
/
64er_Magazin_Sonderheft_34_19xx_Markt__Technik_de_Disk_1_of_2_Side_B.d64
/
spg_demo char-ed
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
5KB
|
183 lines
10 ifpeek(49234)<>asc("s")thenload"spg.obj",8,1
20 sys49152
100 mm=0
105 !fd 0,126,254,130,130,130,130,130,254,0
110 !fd 0,127,254,254,254,254,254,254,254,0
120 !bc 190,191
125 t%(0)=128:fori=1to7:t%(i)=t%(i-1)/2:next
130 print"[147][142][154]";:poke53280,6:poke53281,6
140 !gr0;gn0;ge
150 fori=0to24:readj:!mb0,i,j:next
160 data 127,0,0,126,0,0,124,0,0,126,0,0,127,0,0,111,128,0,71,192,0,3,128,0,1
170 fori=0to24:readj:!mb1,i,j:next
175 data 127,0,0,66,0,0,68,0,0,66,0,0,81,0,0,104,128,0,68,64,0,2,128,0,1
180 fori=0to23:readj:!mb2,i,j:next
185 data 255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0,255,0,0
190 :
200 print"[147][155] [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
210 print" *** [160]c64 character-set editor [160]*** [160][154]"
220 !tf4,3,8,8,126;tc4,3,8,8,14
225 !ml1,2;mc1,11;mp1,1,0,0,0;mo1,1
228 print
230 print,,"edit","load"
232 print,,"clear","save"
234 print,,"mirror","reboot"
236 print,,"turn","revers"
238 print,,"rotate","copy"
240 print,,"autorev","exit"
250 fori=0to7:forj=0to31:!tf4+j,13+i,1,1,32*i+j:nextj,i:!tc4,13,32,8,14
260 m1=0:m2=0:ch=0:dim cc(7)
270 :
300 ba=13*4096+8*ch:!tc4,13,32,8,14:!tc4+(chand31),13+ch/32,1,1,15
301 !mx1,8*(7+(chand31)),154+8*int(ch/32)
310 print"[154]";:forj=0to7:!bp4,3+j,ba+j:cc(j)=peek(1024):next
320 !tc20,4,20,7,14;tc20+10*m2,4+m1,10,1,15
325 gosub50000
330 ifpy>12then500
340 if(px>3)and(px<12)and(py>2)and(py<11)then1000
350 if(px>19)and(py>3)and(py<10)then400
360 goto325
400 m2=-(px>29):m1=py-4
405 ifm2=0then320
410 onm1+1goto900,800,460,320,320,420
420 !pt40960: rem exit
430 !tp10,8,"[159][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
432 !tp10,9," do you really want "
434 !tp10,10," to exit ?[160] "
440 gosub50300:ifynthen:!fo:end
450 !rt40960:m1=0:m2=0:goto320
460 !pt40960: rem reboot
470 !tp10,8,"[159][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
472 !tp10,9," do you really want "
474 !tp10,10," to reboot ? "
480 gosub50300:ifynthenrun
490 !rt40960:m1=0:m2=0:goto320
500 rem select characters
510 if(px<4)or(px>35)or(py>20)then325
520 ch=32*(py-13)+px-4:goto300
800 !pt40960: rem save
810 !tp10,8,"[159][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
820 !tp10,9," save character-set "
830 !tp10,10,"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
840 gosub50400:ifcn$=""then490
850 !fs0,cn$,8:gosub50600:!mo1,1:goto490
900 !pt40960: rem load
910 !tp10,8,"[159][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
920 !tp10,9," load character-set "
930 !tp10,10,"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
940 gosub50400:ifcn$=""then490
950 !fl0,cn$,8:gosub50600:!mo1,1:goto490
1000 sx=px-4:sy=py-3:k=cc(sy):onm2+1goto1010,1020
1010 onm1+1goto1100,1200,1400,1300,1500,1600
1020 onm1+1goto1700,1800,100,1900,2000
1100 rem edit
1110 ifkandt%(sx)then1130
1120 cc(sy)=kort%(sx):gosub50100:goto1140
1130 cc(sy)=kand(255-t%(sx)):gosub50100
1140 print"[154]";:!bb4,py,cc(sy):goto325
1200 rem clear
1210 fori=0to7:cc(i)=0:next:gosub50100:goto300
1300 rem turn
1310 gosub50200
1320 onigoto1350,1330,1310,1310,300
1330 !mc0,0
1332 fori=0to7:cd(7-i)=0:forj=0to7:ifcc(j)andt%(i)thencd(7-i)=cd(7-i)ort%(j)
1340 next:next:goto1370
1350 !mc0,0
1352 fori=0to7:cd(i)=0:forj=0to7:ifcc(j)andt%(i)thencd(i)=cd(i)ort%(7-j)
1360 next:next
1370 fori=0to7:cc(i)=cd(i):next:gosub50100
1380 forj=0to7:!bp4,3+j,ba+j:next:!mc0,15:goto1310
1400 rem mirror
1410 gosub50200
1420 onigoto1430,1430,1450,1450,300
1430 !mc0,0
1432 fori=0to7:cd=0:forj=0to7:ifcc(i)andt%(j)thencd=cdort%(7-j)
1440 next:cc(i)=cd:next:goto1480
1450 !mc0,0
1452 fori=0to7:cd(i)=cc(7-i):next
1470 fori=0to7:cc(i)=cd(i):next
1480 gosub50100:forj=0to7:!bp4,3+j,ba+j:next:!mc0,15:goto1410
1500 rem rotate
1510 gosub50200:ifi=5then300
1520 !mc0,0:onigoto1530,1540,1550,1560
1530 fori=0to7:cc(i)=255and(cc(i)/2):next:goto1570
1540 fori=0to7:cc(i)=255and(cc(i)*2):next:goto1570
1550 fori=0to6:cc(7-i)=cc(6-i):next:cc(0)=0:goto1570
1560 fori=0to6:cc(i)=cc(i+1):next:cc(7)=0
1570 gosub50100
1580 forj=0to7:!bp4,3+j,ba+j:next:!mc0,15:goto1510
1600 rem autorev
1610 !rg1,53248;gk1,2,3;gn2;gi;pg2,60416;pg1,53248:goto300
1900 rem revers
1910 fori=0to7:cc(i)=255-cc(i):next:gosub50100:goto300
2000 rem copy
2010 !mc0,7:mm=1:gosub50000:if(px<4)or(px>35)or(py>20)or(py<13)then2010
2020 !mc0,15:mm=0:ch=32*(py-13)+px-4
2030 gosub50100:goto300
50000 rem maus-select-routine
50010 !mo0,1;ml0,0+mm;mx0,27+8*px,53+8*py
50020 ifpeek(198)=0then:!js:goto50020
50030 geti$:ifi$=chr$(13)then:!ml0,1:return
50040 ifi$="[145]"thenifpy>0thenpy=py-1
50050 ifi$=""thenifpx<39thenpx=px+1
50060 ifi$=""thenifpy<24thenpy=py+1
50070 ifi$="[157]"thenifpx>0thenpx=px-1
50080 goto50010
50100 rem storage-character
50110 forj=0to7:!fb0,ch,j,cc(j):next:return
50200 rem warten auf cursor-taste
50210 ifpeek(198)=0then:!js:goto50210
50220 geti$:i=1
50230 ifi$<>mid$("[157][145]"+chr$(13),i,1)theni=i+1:ifi<6then50230
50240 ifi=6then50210
50250 return
50300 rem nur yes oder no
50310 !tp10,11," [185][185][185][185][185] [185][185][185][185] "
50320 !tp10,12," [146] yes [146] no "
50330 !tp10,13," [184][184][184][184][184] [184][184][184][184] "
50340 gosub50000:ifpy<>12then50340
50350 if(px<13)or(px>17)then50370
50360 yn=1:return
50370 if(px<23)or(px>26)then50340
50380 yn=0:return
50400 rem namenseingabe
50405 !tp10,11," give name for set: "
50410 !tp10,12," [185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185] "
50420 !tp10,13," [146]> "
50430 !tp10,14," [184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184] "
50440 cn$=""
50450 !tf12,13,17,1,32;tp12,13,cn$+"[164]";
50460 wait198,63:geti$:i=asc(i$):ifi=13then50520
50465 ia=iand96:if(ia=0)and(i<>20)then50460
50470 ifiathen50500
50480 ifcn$=""then50460
50490 cn$=left$(cn$,len(cn$)-1):goto50450
50500 iflen(cn$)=16then50450
50510 cn$=cn$+i$:goto50450
50520 ifcn$<>"$"thenreturn
50530 !pt43008:print"[147][155]";
50540 !mo0,0;mo1,0:open1,8,0,"$":get#1,i$,i$:goto50550
50545 !js:ifpeek(198)>0thengeti$:printtab(35)" w ";:gosub50800:geti$
50547 ifi$="x"then50580
50548 print
50550 get#1,i$,i$,i$,j$:ifst>63then50580
50555 printasc(i$+chr$(0))+256*asc(j$+chr$(0));
50560 get#1,i$:printi$;:ifi$<>""then50560
50570 goto50545
50580 print"[164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
50590 print" press any key[160]"
50595 gosub50800:geti$:!rt43008:close1:!mo0,1;mo1,1:goto50440
50600 rem diskettenkanal abfragen
50610 open15,8,15:input#15,i1$,i2$,i3$,i4$:close15
50620 !tp4,16,"[153][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184]"
50625 !tp4,17," [160]disk message : "
50630 !tp4,18," [185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185] "
50640 !tp4,19," [146] "
50650 !tp4,20," [184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184][184] [155]"
50660 !tp6,19,i1$","i2$","i3$","i4$","
50670 gosub50800:geti$:return
50800 rem warten auf tastaturpuffer
50810 ifpeek(198)=0then:!js:goto50810
50820 return